package com.exception_;
//当应用程序试图将字符串转换成一种数值类型，但该字符串不能转换为适当格式时，抛出该异常。
public class NumberFormatException_ {
    public static void main(String[] args) {
        String name = "1234";
        //将String 转 int
        int num = Integer.parseInt(name);
        System.out.println(num);

        String name1 = "1ee234";
        //将String 转 int
        int num1 = 100;
        try{
            num1 = Integer.parseInt(name1);
        }catch (Exception e){
            System.out.println(e.getMessage());
        }

        System.out.println(num1);
    }
}
